const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
  transpileDependencies: true,
  configureWebpack: {
    externals: {
      // 添加下面这行代码
      "agora-electron-sdk": "commonjs2 agora-electron-sdk",
      "agora-rdc-core": "commonjs2 agora-rdc-core",
    },
  },
  pluginOptions: {
    //electronBuilder配置
    electronBuilder: {
      externals: ["agora-electron-sdk"],
      nodeIntegration: true,
      builderOptions: {
        appId: "agora.io.ElectronApiExample",
        asar: true,
        asarUnpack: ["node_modules/agora-electron-sdk"],
        buildDependenciesFromSource: true,
        compression: "normal",
        // productName: "Agora-Electron-API-Example",
        // publish: [],
        // files: ["!*.log"],
      },
    },
  },
});
